]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st: Fix offscreen leak if cogl_framebuffer_allocate fails
authorAaron Plattner <aplattner@nvidia.com>
Fri, 18 Mar 2016 23:00:05 +0000 (16:00 -0700)
committerRay Strode <rstrode@redhat.com>
Wed, 30 Mar 2016 19:59:10 +0000 (15:59 -0400)
If cogl_framebuffer_allocate fails in _st_create_shadow_pipeline_from_actor, the
CoglOffscreen* that was allocated earlier in the function is leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=735705

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
src/st/st-private.c

index 559336c42d15cda9cf5585d632fa3ea853fef35f..d40eceb86c78a2fc2a39578b99c5f865faa26bf7 100644 (file)
@@ -442,6 +442,7 @@ _st_create_shadow_pipeline_from_actor (StShadow     *shadow_spec,
       if (!cogl_framebuffer_allocate (fb, &catch_error))
         {
           cogl_error_free (catch_error);
+          cogl_object_unref (offscreen);
           cogl_object_unref (buffer);
           return NULL;
         }